#pragma once

#include "File.h"
#include <Windows.h>
#include <string>
#include <vector>

namespace GPUCC
{
	class ApiFile : public File
	{
	public:
		ApiFile(const std::string& Path);
		virtual ~ApiFile();

		virtual bool Open(bool ReadOnly = false);
		virtual void Close();
		virtual bool IsOpen();

		bool ReadAll(unsigned char* Buffer, unsigned int BufferLength);
		bool ReadAll(std::vector<unsigned char>& Buffer);
		
	protected:
		virtual unsigned int GetSizeInternal();

	private:
		HANDLE m_File;
	};
}
